<template>
  <van-overlay :show="loading" class="loading">
    <van-loading />
  </van-overlay>
</template>
<script>
import { Overlay, Loading } from 'vant'
import { ref } from 'vue'
export default {
  name: 'Loading',
  components: {
    [Overlay.name]: Overlay,
    [Loading.name]: Loading
  },
  setup() {
    const loading = ref(true)
    return {
      loading
    }
  }
}
</script>
<style lang="stylus" scoped>
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
}
</style>
